/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InfosProgressView.java
 *
 * Created on 3 janv. 2013, 18:29:01
 */
package polybook.view;

import javax.swing.JProgressBar;
import polybook.utils.ProcessCallBackable;

/**
 *
 * @author Arnaud
 */
public class InfosProgressView extends NamedJPanel {
    
    protected static final String title = "Progression en cours";
    protected InfosProgressViewUpdater processCallback;
    
    /** Creates new form InfosProgressView */
    public InfosProgressView() {
        initComponents();
        this.processCallback = new InfosProgressViewUpdater(jProgressBar);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jProgressBar = new javax.swing.JProgressBar();

        setBorder(javax.swing.BorderFactory.createTitledBorder(getTitle()));
        setMinimumSize(new java.awt.Dimension(0, 100));
        setPreferredSize(new java.awt.Dimension(250, 100));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 49, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JProgressBar jProgressBar;
    // End of variables declaration//GEN-END:variables

    @Override
    public String getTitle() {
        return title;
    }
    
    public InfosProgressViewUpdater getProcessCallback() {
        return this.processCallback;
    }
}
